package com.sparrow.rabbit;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;


/**
 * 
 *@Description: 消息消费者
 *该消费者实现了对hello队列的消费，消费操作为输出消息的字符串内容
 *@Author:hjt 
 *@Version:1.0.0
 */
@Component
@RabbitListener(queues = "hello")
public class Receiver {

    @RabbitHandler
    public void process(String hello) {
        System.out.println("Receiver : " + hello);
    }

}
